package com.sc.pattern.activeobjects;

/**
 * Created  on 2018/1/14.
 *
 * @author sc
 */
public class MakeStringRequest extends MethodRequest {
    private final int count;
    private final char fillChar;
    public MakeStringRequest(Servant servant, FutureResult futureResult,int count,char fillChar) {
        super(servant, futureResult);
        this.count = count;
        this.fillChar = fillChar;
    }

    @Override
    public void execute() {
        Result result = servant.makeString(count, fillChar);
        futureResult.setResult(result);
    }
}
